import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import Element from 'element-ui'
import md5 from 'js-md5'
import moment from 'moment'; //导入模块
import 'element-ui/lib/theme-chalk/index.css'
import './assets/style/index.css'
import "./assets/svgs/index.js";
import bjsNotify from './components/bjsNotify.js'
import GLOBAL from "./assets/js/const/global"
moment.locale('zh-cn'); //设置语言 或 moment.lang('zh-cn');

Vue.use(Element)
Vue.prototype.$moment = moment
Vue.prototype.$md5 = md5
Vue.prototype.$bjsNotify = bjsNotify
Vue.prototype.$GLOBAL = GLOBAL
Vue.config.productionTip = false

router.beforeEach((to, from, next) => {
  if ( to.name == null || to.name === 'notfound') {
    router.push('/bjstk')
  } else {
    next()
  }
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
